
package com.jiankang.askhealth.constant;
public enum UserType {
	SUPER_ADMIN("a", "超级管理员"),
	NORMAL_USER("u", "普通用户");
	
	private UserType(String type, String desc) {
		this.type = type;
		this.desc = desc;
	}
	
	public static UserType getByType(String type) {
		UserType[] values = values();
		for(UserType usertype : values) {
			if(type.equals(usertype.getType())) {
				return usertype;
			}
		}
		return null;
	}
	
	private String type;
	private String desc;
	
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
}
